package com.key.win.system.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.key.win.base.model.MybatisID;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@ApiModel("设备实体")
@Data
@TableName("sys_device")
@EqualsAndHashCode(callSuper = true)
public class SysDevice extends MybatisID {
    @ApiModelProperty("code")
    private String code;
    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("用户Id")
    @TableField(exist = false)
    private String userId;
    @ApiModelProperty("用户列表")
    @TableField(exist = false)
    private List<SysUser> sysUsers;
    @ApiModelProperty("机构Id")
    @TableField(exist = false)
    private String organId;
    @ApiModelProperty("机构列表")
    @TableField(exist = false)
    private List<SysOrgan> sysOrgans;
    @ApiModelProperty("设备的状态：[true:在线 false:离线]")
    @TableField(exist = false)
    private boolean isOnLine = false;

    @ApiModelProperty("token")
    @TableField(exist = false)
    private String token;

    @ApiModelProperty("sysUserDevices")
    @TableField(exist = false)
    private List<SysUserDevice> sysUserDevices;
}